@extends(config('admin.systems.layout_form_blade'))

@section('content')
    <div class="nav-tabs-custom">
        <ul class="nav nav-tabs">
            <li class=""><a href="javascript:void(0)" onclick="window.history.go(-1);">返回列表</a></li>
            <li class="active"><a href="#basic" data-toggle="tab" aria-expanded="true">基础</a></li>
        </ul>
        <div class="tab-content">
            <div class="tab-pane active" id="basic">
                <input type="hidden" name="info[id]" value="{{ get_value($detail, 'id', '') }}">

                <div class="form-group">
                    <label for="input-title" class="col-sm-1 control-label">广告标题</label>

                    <div class="col-sm-9">
                        {!! get_input_html('info[title]', get_value($detail, 'title', ''), ['id'=>'input-title']) !!}
                    </div>
                </div>

                <div class="form-group">
                    <label for="input-big_title" class="col-sm-1 control-label">扩展第二标题</label>

                    <div class="col-sm-9">
                        {!! get_input_html('info[big_title]', get_value($detail, 'big_title', ''), ['id'=>'input-big_title']) !!}
                    </div>
                </div>

                <div class="form-group">
                    <label for="input-links" class="col-sm-1 control-label">跳转链接</label>

                    <div class="col-sm-9">
                        {!! get_input_html('info[links]', get_value($detail, 'links', ''), ['id'=>'input-links']) !!}
                    </div>
                </div>

                <div class="form-group">
                    <label for="input-description" class="col-sm-1 control-label">广告描述</label>

                    <div class="col-sm-9">
                        {!! get_textarea_html('info[description]', get_value($detail, 'description', ''), ['id'=>'input-description']) !!}
                    </div>
                </div>

                {{--<div class="form-group">
                    <label for="input-cover" class="col-sm-1 control-label">图片</label>

                    <div class="col-sm-9">
                        {!! get_upload_picture_html('info[cover]', ['id'=>0, 'url'=>get_value($detail, 'cover', ''), 'desc'=>''], 1) !!}
                    </div>
                </div>--}}

                <div class="form-group">
                    <label for="input-sort" class="col-sm-1 control-label">排序</label>

                    <div class="col-sm-9">
                        {!! get_input_html('info[sort]', get_value($detail, 'sort', 0), ['id'=>'input-sort', 'type'=>'number']) !!}
                    </div>

                    <span class="col-sm-2">
                        由小到大
                    </span>
                </div>

                <div class="form-group">
                    <label for="input-content" class="col-sm-1 control-label">广告内容</label>

                    <div class="col-sm-9">
                        @switch($advDetail->type)
                            @case(0)
                            {!! get_textarea_html('info[content]', get_value($detail, 'content', ''), ['id'=>'input-content']) !!}
                            @break

                            @case(1)
                            {!! get_editor_html('info[content]', get_value($detail, 'info' , '')) !!}
                            @break

                            @case(2)
                            {!! get_upload_picture_html('info[content]', ['id'=>0, 'url'=>get_value($detail, 'content', ''), 'desc'=>''], 1) !!}
                            @break

                            @case(3)
                            {!! get_upload_picture_html('info[content]', ['id'=>0, 'url'=>get_value($detail, 'content', ''), 'desc'=>''], 1) !!}
                            @break
                        @endswitch
                    </div>
                </div>


            </div>
        </div>
    </div>
@endsection